#!/usr/bin/python3
# -*- coding:utf-8 -*-
"""
@author: henry_oulen@163.com
@file: build_script.py
@time: 2024/7/26 14:22
@desc: 
"""
import datetime
import subprocess

# 定义要执行的命令
command = [
    'pyinstaller',
    '-i', 'json_tool.ico',
    '-F',
    '-w',
    'json_tools_latest.py'
]

# 使用 subprocess.run() 执行命令
result = subprocess.run(command, capture_output=True, text=True)

# 输出命令的结果
print("Output:\n", result.stdout)
print("Errors (if any):\n", result.stderr)
print("Exit code:", result.returncode,"\r\n")
print("-" * 50)
print(f"打包时间{datetime.datetime.now()}打包成功，请查看dist目录")